<?php

namespace farm\service;
use App\Http\Middleware\VerifyMiniToken;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Route;
use Predis\Client;

class Crop
{
    public static function route(): void
    {
        Route::post('/crop', [self::class, 'addCrop'])->withoutMiddleware(VerifyMiniToken::class);
    }

    public function addCrop() {
        $view = \farm\utils\ApiUtils::getRedis()->incr('farm:view');
        return $view;
    }
}
